package io.itit.ecp.admin.provide.action.resp;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.io.Serializable;
import java.util.List;

@Data
@ToString
@ApiModel("通过Access_token获取用户信息响应结果")
public class CommonLoginUserInfoResp implements Serializable {

    private static final long serialVersionUID = 1L;

//    {
//        "success": true,
//            "message": "",
//            "content": {
//        "user": {
//            "userId": "9be26bdb-ed8d-4a12-bb9b-9ff38dba6e5c",
//                    "userName": "能碳管理员",
//                    "loginName": "nengtan_admin",
//                    "loginPwd": null,
//                    "isOriginalAdmin": "0",
//                    "rootOrgId": null,
//                    "userSex": "0",
//                    "faceType": 0
//        },
//        "orgs": null,
//                "currentOrgId": "8055930e-43fa-4447-81db-d648700365da",
//                "currentOrgCode": "GZ-O-000001",
//                "currentTmn": "pc",
//                "tmnId": "1",
//                "tmnName": "PC",
//                "loginId": "d778b266-0456-4dfe-80e4-eed3b4bb4199",
//                "ssoSessionId": null,
//                "regionList": [
//        {
//            "regionId": "42",
//                "regionName": "广州市",
//                "regionNum": "440100"
//        }
//        ],
//        "authenticated": true,
//                "appSoftContexts": [],
//        "tmnMenuContexts": []
//    }
//    }

    private Boolean success;

    private String message;

    private Content content;

    @Data
    public static class Content{
        public User user;
        public List<Org> orgs;
        public String currentOrgId;
        public String currentOrgCode;
        public String currentTmn;
        public String tmnId;
        public String tmnName;
        public String loginId;
        public String ssoSessionId;
        public String authenticated;
        public List<Object> appSoftContexts;
        public List<Object> tmnMenuContexts;
        public List<Region> regionList;
    }

    @Data
    public static class User{
        public String userId;
        public String userName;
        public String loginName;
        public String loginPwd;
        public String isOriginalAdmin;
        public String rootOrgId;
        public String userSex;
        public String faceType;
    }

    @Data
    public static class Region{
        public String regionId;
        public String regionName;
        public String regionNum;
    }

    @Data
    public static class Org{
        public String orgId;
        public String orgCode;
        public String orgName;
        public String orgSeq;
        public String isMain;
    }
}
